3.3.47 \(\int \frac {c+\frac {d}{x}}{\sqrt {a+\frac {b}{x}}} \, dx\) [247]

Optimal. Leaf size=51 \[ \frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {(b c-2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \]

[Out]

-(-2*a*d+b*c)*arctanh((a+b/x)^(1/2)/a^(1/2))/a^(3/2)+c*x*(a+b/x)^(1/2)/a

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {382, 79, 65, 214} \begin {gather*} \frac {c x \sqrt {a+\frac {b}{x}}}{a}-\frac {(b c-2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(c + d/x)/Sqrt[a + b/x],x]

[Out]

(c*Sqrt[a + b/x]*x)/a - ((b*c - 2*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/a^(3/2)

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 382

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> -Subst[Int[(a + b/x^n)^p*((c +
 d/x^n)^q/x^2), x], x, 1/x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {c+\frac {d}{x}}{\sqrt {a+\frac {b}{x}}} \, dx &=-\text {Subst}\left (\int \frac {c+d x}{x^2 \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )\\ &=\frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {\left (-\frac {b c}{2}+a d\right ) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right )}{a}\\ &=\frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {\left (2 \left (-\frac {b c}{2}+a d\right )\right ) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{a b}\\ &=\frac {c \sqrt {a+\frac {b}{x}} x}{a}-\frac {(b c-2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 51, normalized size = 1.00 \begin {gather*} \frac {c \sqrt {a+\frac {b}{x}} x}{a}+\frac {(-b c+2 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{a^{3/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(c + d/x)/Sqrt[a + b/x],x]

[Out]

(c*Sqrt[a + b/x]*x)/a + ((-(b*c) + 2*a*d)*ArcTanh[Sqrt[a + b/x]/Sqrt[a]])/a^(3/2)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(173\) vs. \(2(43)=86\).
time = 0.04, size = 174, normalized size = 3.41

method result size
risch \(\frac {c \left (a x +b \right )}{a \sqrt {\frac {a x +b}{x}}}+\frac {\left (\frac {\ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) d}{\sqrt {a}}-\frac {\ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) b c}{2 a^{\frac {3}{2}}}\right ) \sqrt {x \left (a x +b \right )}}{x \sqrt {\frac {a x +b}{x}}}\) \(108\)
default \(-\frac {\sqrt {\frac {a x +b}{x}}\, x \left (2 \sqrt {x \left (a x +b \right )}\, a^{\frac {3}{2}} d -2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}\, b c -2 \sqrt {a \,x^{2}+b x}\, a^{\frac {3}{2}} d -\ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a b d -\ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a b d +\ln \left (\frac {2 \sqrt {x \left (a x +b \right )}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) b^{2} c \right )}{2 \sqrt {x \left (a x +b \right )}\, b \,a^{\frac {3}{2}}}\) \(174\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d/x)/(a+1/x*b)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/2*((a*x+b)/x)^(1/2)*x*(2*(x*(a*x+b))^(1/2)*a^(3/2)*d-2*(x*(a*x+b))^(1/2)*a^(1/2)*b*c-2*(a*x^2+b*x)^(1/2)*a^
(3/2)*d-ln(1/2*(2*(a*x^2+b*x)^(1/2)*a^(1/2)+2*a*x+b)/a^(1/2))*a*b*d-ln(1/2*(2*(x*(a*x+b))^(1/2)*a^(1/2)+2*a*x+
b)/a^(1/2))*a*b*d+ln(1/2*(2*(x*(a*x+b))^(1/2)*a^(1/2)+2*a*x+b)/a^(1/2))*b^2*c)/(x*(a*x+b))^(1/2)/b/a^(3/2)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 109 vs. \(2 (43) = 86\).
time = 0.50, size = 109, normalized size = 2.14 \begin {gather*} \frac {1}{2} \, c {\left (\frac {2 \, \sqrt {a + \frac {b}{x}} b}{{\left (a + \frac {b}{x}\right )} a - a^{2}} + \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{a^{\frac {3}{2}}}\right )} - \frac {d \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{\sqrt {a}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)/(a+b/x)^(1/2),x, algorithm="maxima")

[Out]

1/2*c*(2*sqrt(a + b/x)*b/((a + b/x)*a - a^2) + b*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a)))/a^(3
/2)) - d*log((sqrt(a + b/x) - sqrt(a))/(sqrt(a + b/x) + sqrt(a)))/sqrt(a)

________________________________________________________________________________________

Fricas [A]
time = 2.64, size = 115, normalized size = 2.25 \begin {gather*} \left [\frac {2 \, a c x \sqrt {\frac {a x + b}{x}} - {\left (b c - 2 \, a d\right )} \sqrt {a} \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right )}{2 \, a^{2}}, \frac {a c x \sqrt {\frac {a x + b}{x}} + {\left (b c - 2 \, a d\right )} \sqrt {-a} \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right )}{a^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)/(a+b/x)^(1/2),x, algorithm="fricas")

[Out]

[1/2*(2*a*c*x*sqrt((a*x + b)/x) - (b*c - 2*a*d)*sqrt(a)*log(2*a*x + 2*sqrt(a)*x*sqrt((a*x + b)/x) + b))/a^2, (
a*c*x*sqrt((a*x + b)/x) + (b*c - 2*a*d)*sqrt(-a)*arctan(sqrt(-a)*sqrt((a*x + b)/x)/a))/a^2]

________________________________________________________________________________________

Sympy [A]
time = 23.03, size = 82, normalized size = 1.61 \begin {gather*} \frac {\sqrt {b} c \sqrt {x} \sqrt {\frac {a x}{b} + 1}}{a} - \frac {2 d \operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{a}} \sqrt {a + \frac {b}{x}}} \right )}}{a \sqrt {- \frac {1}{a}}} - \frac {b c \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{a^{\frac {3}{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)/(a+b/x)**(1/2),x)

[Out]

sqrt(b)*c*sqrt(x)*sqrt(a*x/b + 1)/a - 2*d*atan(1/(sqrt(-1/a)*sqrt(a + b/x)))/(a*sqrt(-1/a)) - b*c*asinh(sqrt(a
)*sqrt(x)/sqrt(b))/a**(3/2)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 89 vs. \(2 (43) = 86\).
time = 0.60, size = 89, normalized size = 1.75 \begin {gather*} -\frac {{\left (b c \log \left ({\left | b \right |}\right ) - 2 \, a d \log \left ({\left | b \right |}\right )\right )} \mathrm {sgn}\left (x\right )}{2 \, a^{\frac {3}{2}}} + \frac {\sqrt {a x^{2} + b x} c}{a \mathrm {sgn}\left (x\right )} + \frac {{\left (b c - 2 \, a d\right )} \log \left ({\left | -2 \, {\left (\sqrt {a} x - \sqrt {a x^{2} + b x}\right )} \sqrt {a} - b \right |}\right )}{2 \, a^{\frac {3}{2}} \mathrm {sgn}\left (x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d/x)/(a+b/x)^(1/2),x, algorithm="giac")

[Out]

-1/2*(b*c*log(abs(b)) - 2*a*d*log(abs(b)))*sgn(x)/a^(3/2) + sqrt(a*x^2 + b*x)*c/(a*sgn(x)) + 1/2*(b*c - 2*a*d)
*log(abs(-2*(sqrt(a)*x - sqrt(a*x^2 + b*x))*sqrt(a) - b))/(a^(3/2)*sgn(x))

________________________________________________________________________________________

Mupad [B]
time = 1.98, size = 88, normalized size = 1.73 \begin {gather*} \frac {2\,d\,\mathrm {atanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {2\,c\,x\,\left (\frac {3\,\sqrt {b}\,\sqrt {b+a\,x}}{2\,a\,x}+\frac {b^{3/2}\,\mathrm {asin}\left (\frac {\sqrt {a}\,\sqrt {x}\,1{}\mathrm {i}}{\sqrt {b}}\right )\,3{}\mathrm {i}}{2\,a^{3/2}\,x^{3/2}}\right )\,\sqrt {\frac {a\,x}{b}+1}}{3\,\sqrt {a+\frac {b}{x}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d/x)/(a + b/x)^(1/2),x)

[Out]

(2*d*atanh((a + b/x)^(1/2)/a^(1/2)))/a^(1/2) + (2*c*x*((3*b^(1/2)*(b + a*x)^(1/2))/(2*a*x) + (b^(3/2)*asin((a^
(1/2)*x^(1/2)*1i)/b^(1/2))*3i)/(2*a^(3/2)*x^(3/2)))*((a*x)/b + 1)^(1/2))/(3*(a + b/x)^(1/2))

________________________________________________________________________________________